import React from 'react'
import { useDispatch, useSelector } from 'react-redux'

export default function Page1() {
  const book = useSelector(state => state.book)
  const disptch = useDispatch()
  return (
    <div>
      <p>{JSON.stringify(book)}</p>
    <button onClick={()=>{
      disptch({type:'book-slice/setName',payload:'商君书'})
    }}>变</button>
    </div>
  )
}
